<!DOCTYPE html>
<html>
    <!--http://www.w3schools.com/js/js_htmldom_methods.asp -->
    <head>
        <meta charset="ISO-8859-1">
        <title>Insert title here</title>
    </head>
    <body>
        <h1>The DOM Programming Interface</h1>
        <p>The HTML DOM can be accessed with JavaScript (and with other programming languages).<br>
            In the DOM, all HTML elements are defined as <b>objects</b>.<br>
            The programming interface is the properties and methods of each object.<br>
            A property is a value that you can get or set (like changing the content of an HTML element).<br>
            A method is an action you can do (like add or deleting an HTML element).
        </p>
        
        <h1>The HTML DOM Document</h1>
        In the HTML DOM object model, the document object represents your web page.<br>
        The document object is the owner of all other objects in your web page.<br>
        If you want to access objects in an HTML page, you always start with accessing the document object.
        <p id="intro">Hello World!</p>
                     
        <script>
            //In the HTML DOM object model, the document object represents your web page.
            //The document object is the owner of all other objects in your web page.
            txt = document.getElementById("intro").innerHTML;
            /*getElementById is a method*/
            /*
             * innerHTML is a property
             * The easiest way to get the content of an element is by using the innerHTML property
             * */
            document.write(txt);
        </script>
        
    </body>
</html>